home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue44 / comcorn / ByteArray / Server_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-03-01  |  4.1 KB  |  97 lines

  1. unit Server_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                  //
  5. // -------                                                                  //
  6. // The types declared in this file were generated from data read from a     //
  7. // Type Library. If this type library is explicitly or indirectly (via      //
  8. // another type library referring to this type library) re-imported, or the //
  9. // 'Refresh' command of the Type Library Editor activated while editing the //
  10. // Type Library, the contents of this file will be regenerated and all      //
  11. // manual modifications will be lost.                                       //
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.11.1.75  $
  15. // File generated on 3/1/99 2:24:16 AM from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: C:\My Documents\DelphiMag, April99\ByteArray\Server.tlb
  19. // IID\LCID: {BA2BF825-CF76-11D2-AF31-0000861EF0BB}\0
  20. // Helpfile: 
  21. // HelpString: Project1 Library
  22. // Version:    1.0
  23. // ************************************************************************ //
  24.  
  25. interface
  26.  
  27. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  28.  
  29. // *********************************************************************//
  30. // GUIDS declared in the TypeLibrary. Following prefixes are used:      //
  31. //   Type Libraries     : LIBID_xxxx                                    //
  32. //   CoClasses          : CLASS_xxxx                                    //
  33. //   DISPInterfaces     : DIID_xxxx                                     //
  34. //   Non-DISP interfaces: IID_xxxx                                      //
  35. // *********************************************************************//
  36. const
  37.   LIBID_Server: TGUID = '{BA2BF825-CF76-11D2-AF31-0000861EF0BB}';
  38.   IID_IBinaryData: TGUID = '{BA2BF826-CF76-11D2-AF31-0000861EF0BB}';
  39.   CLASS_BinaryData: TGUID = '{BA2BF828-CF76-11D2-AF31-0000861EF0BB}';
  40. type
  41.  
  42. // *********************************************************************//
  43. // Forward declaration of interfaces defined in Type Library            //
  44. // *********************************************************************//
  45.   IBinaryData = interface;
  46.   IBinaryDataDisp = dispinterface;
  47.  
  48. // *********************************************************************//
  49. // Declaration of CoClasses defined in Type Library                     //
  50. // (NOTE: Here we map each CoClass to its Default Interface)            //
  51. // *********************************************************************//
  52.   BinaryData = IBinaryData;
  53.  
  54.  
  55. // *********************************************************************//
  56. // Interface: IBinaryData
  57. // Flags:     (4416) Dual OleAutomation Dispatchable
  58. // GUID:      {BA2BF826-CF76-11D2-AF31-0000861EF0BB}
  59. // *********************************************************************//
  60.   IBinaryData = interface(IDispatch)
  61.     ['{BA2BF826-CF76-11D2-AF31-0000861EF0BB}']
  62.     function Get_Data: OleVariant; safecall;
  63.     procedure Set_Data(Value: OleVariant); safecall;
  64.     property Data: OleVariant read Get_Data write Set_Data;
  65.   end;
  66.  
  67. // *********************************************************************//
  68. // DispIntf:  IBinaryDataDisp
  69. // Flags:     (4416) Dual OleAutomation Dispatchable
  70. // GUID:      {BA2BF826-CF76-11D2-AF31-0000861EF0BB}
  71. // *********************************************************************//
  72.   IBinaryDataDisp = dispinterface
  73.     ['{BA2BF826-CF76-11D2-AF31-0000861EF0BB}']
  74.     property Data: OleVariant dispid 1;
  75.   end;
  76.  
  77.   CoBinaryData = class
  78.     class function Create: IBinaryData;
  79.     class function CreateRemote(const MachineName: string): IBinaryData;
  80.   end;
  81.  
  82. implementation
  83.  
  84. uses ComObj;
  85.  
  86. class function CoBinaryData.Create: IBinaryData;
  87. begin
  88.   Result := CreateComObject(CLASS_BinaryData) as IBinaryData;
  89. end;
  90.  
  91. class function CoBinaryData.CreateRemote(const MachineName: string): IBinaryData;
  92. begin
  93.   Result := CreateRemoteComObject(MachineName, CLASS_BinaryData) as IBinaryData;
  94. end;
  95.  
  96. end.
  97.